<html>
<body>
<h1>Source Plugin</h1>

<p>The source plugin will bundle your project source into a .jar file that can be installed in the repository</p>

<div id="after-summary">
    <p>If your project has a single java artifact, then no configuration is required. Just include the
        plugin as follows</p>
    <pre>&lt;plugin group="quokka.plugin.source" version="?"/&gt; </pre>
    <p>This will automatically add a <tt>source</tt> artifact to your project during the <tt>init</tt>
        target and package your sources during the <tt>package</tt> goal.</p>

    <p>If you have multiple artifacts, then you will need to specify the artifact the sources are
        for as follows:</p>
    <pre>&lt;property name="q.source.init.artifactNames" value="&lt;artifact name&gt;"/&gt;
&lt;plugin group="quokka.plugin.source" version="?"/&gt; </pre>
    <p>If you want to create multiple source bundles, then you need to create a separate
        target from the <tt>package-template</tt> for each source bundle. The following example
        shows how to do this:</p>
    <pre>&lt;artifacts group="group1" version="0.1-ss"&gt;
    &lt;artifact name="sample" type="jar"/&gt;
    &lt;artifact name="sample2" type="jar"/&gt;
&lt;/artifacts&gt;

&lt;dependency-set&gt;
    &lt;property name="q.source.init.artifactNames" value="sample, sample2"/&gt;
    &lt;plugin group="quokka.plugin.source" version="?"&gt;
        &lt;target name="package" prefix="q.source.package"&gt;
            &lt;property name="artifactName" value="sample"/&gt;
            &lt;property name="source.set.includes" value="**/sample/**"/&gt;
        &lt;/target&gt;
        &lt;target template="package-template" name="sample2-source"&gt;
            &lt;property name="artifactName" value="sample2"/&gt;
            &lt;property name="source.set.dir" value="${q.source.package.source.set.dir}"/&gt;
            &lt;property name="source.set.includes" value="**/sample2/**"/&gt;
        &lt;/target&gt;
    &lt;/plugin&gt;
&lt;/dependency-set&gt; </pre>
</div>
<div id="init"><p></p>
    <p><b>Properties:</b></p>
    <ul>                                                                                                             
        <li><b>artifactNames</b> <i>Optional.</i> Only required if the project has multiple artifacts. Can
        be a comma separated list of names.</li>
    </ul>
</div>
<div id="package-template"><p></p>
    <p><b>Properties:</b></p>
    <ul>
        <li><b>artifactName</b> <i>Optional.</i> The name of the artifact that will be packaged. Only required
            if there are multiple source artifacts in the project.</li>
        <li><b>source</b> <i>Mandatory.</i> A resource collection containing the sources to bundle.
            Only required if there are multiple source artifacts in the project.</li>
        <li>Any of the following properties may also be used: compress, keepCompression, encoding, filesOnly,
            defaultExcludes, manifest, filesetManifest, update, whenManifestOnly, duplicate, index, manifestEncoding,
            roundUp, level. See the Jar plugin for more information on these options.
        </li>
    </ul>
</div>
</body>
</html>